package twentyThreePattern.BehaviorPattern11.zpk.command_vs_strategy.strategy;

public class Context {

	private Algorithm algorithm;

	public Context(Algorithm algorithm) {
		this.algorithm = algorithm;
	}

	// 执行压缩算法
	public boolean compress(String source, String to) {
		return algorithm.compress(source, to);
	}

	// 执行解压缩算法
	public boolean uncompress(String source, String to) {
		return algorithm.uncompress(source, to);
	}

}
